<?php
/**
 * Created by PhpStorm.
 * User: lizx
 * Date: 2018/1/29
 * Time: 16:29
 */

namespace app\common;

class Service
{

    static public $data;

    /**
     * 创建对象
     * @param bool $flush
     * @return static
     */
    public static function instance($flush = false)
    {
        self::$data = null;
        return Instance::getInstance(get_called_class(), $flush);
    }

    /**
     * 销毁对象
     */
    public static function destructInstance()
    {
        Instance::destructInstance(get_called_class());
    }

}

